<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>反转字符串</title>
	</head>
	<body>
		<script type="text/javascript">
			let s = 'dsaghoi1jio';
			function reversal(str) {
				let newStr = ''
				for (let i = str.length - 1; i >= 0; i--) {
					newStr += str[i];
				}
				return newStr;
			}
			console.log(reversal(s));
		</script>
	</body>
</html>
